package com.itheima_02;

public class Student {
    // 成员变量

    String name;
    private int age;

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        if(age <=0 || age >= 120) {
            System.out.println("age error!");
            return;
        }
        this.age = age;
    }

    public void show() {
        System.out.println(name + "," + age);
    }
}
